package com.fahai.web.entity;/**
 * Created by Lilinjun on 17/6/7.
 */

import com.fahai.utils.DateUtil;
import lombok.Data;

import java.sql.Timestamp;

/**
 * 数据分析
 *
 * @author
 * @create 2017-06-07 下午2:01
 **/
@Data
public class DataAnalyse {
    public String wxopenid;

    public String uname;

    public String uphone;

    public String uphoneArea;

    public Integer userid;

    public String lawyername;
    public String alawyername;

    public Timestamp firstTime;

    public Timestamp lastTime;

    public Timestamp createTime;

    public String lawyerPhone;
    //alawyer_phone
    public String alawyerPhone;

    public Integer lawyerStates;
    public Integer rowno;

    public Long callId;


    public Integer lawyerid;
    public Integer proid;//通话发起位置

    public Integer calledDuration;

    public Integer initiator;

    public Integer isEffective;
    public Integer callStatus;
    public Integer rejectStatus;


    public Timestamp startTime;


    public String pxfx;//排序方向

    //发起方
    public String initiatorStr;

    //是否有效
    public String isEffectiveStr;


    public String acname;//服务律师地区
    public String alawyerid;//服务律师ID


    public String getIsEffectiveStr() {
        if(null==this.isEffective){
            return "";
        }else{
            switch (this.isEffective) {
                case 1:
                    return "有效";
                case 0:
                    return "无效";
                default:
                    return "";
            }
        }


    }

    public String getInitiatorStr() {
    if(null==this.initiator){
        return "";
    }else{
        switch (this.initiator) {
            case 1:
                return "律师";
            case 0:
                return "客户";
            default:
                return "未知";
        }
    }

    }



    public String lawyerStatesStr;

    public String getLawyerStatesStr() {
        if(null==this.lawyerStates){
            return "";
        }else{switch (this.lawyerStates) {
            case 1:
                return "在线";
            default:
                return "下线";
        }

        }


    }


    //创建时间
    public String createTimeStr;

    public String getCreateTimeStr() {
        return DateUtil.TimeStampToString(this.createTime, "yyyy-MM-dd HH:mm:ss");
    }


    //首次咨询时间
    public String firstTimetr;

    public String getFirstTimetr() {
        return DateUtil.TimeStampToString(this.firstTime, "yyyy-MM-dd HH:mm:ss");
    }

    //末次咨询时间

    public String lastTimeStr;

    public String getLastTimeStr() {
        return DateUtil.TimeStampToString(this.lastTime, "yyyy-MM-dd HH:mm:ss");
    }
    //通话发起时刻

    public String startTimeStr;

    public String getStartTimeStr() {
        return DateUtil.TimeStampToString(this.startTime, "yyyy-MM-dd HH:mm:ss");
    }





    public String urmoney; //用户余额
    public String allDistillMoney;//律师可体现余额



}
